<template>
	<view class="my">
		<u-navbar :border-bottom="false" :is-back="false"></u-navbar>
		<view class="info acea-row row-middle row-column" @click="common.go('/pages/pack/my/info')">
			<image :src="info.headimg" mode=""></image>
			<text>{{info.truename?info.truename:'勤劳的教师'}}</text>
			<!-- <text>幼儿英语&拉丁舞</text> -->
		</view>
		<view class="list">
			<view class="item acea-row row-middle row-between" @click="common.go('/pages/class/classList')">
				<view class="left acea-row row-middle">
					<image src="../../static/images/my01.png" mode=""></image>
					<text>当前授课班级</text>
				</view>
				<u-icon name="arrow-right" color="#737981" size="32"></u-icon>
			</view>
			<view class="item acea-row row-middle row-between" @click="common.go('/pages/index/studentList')">
				<view class="left acea-row row-middle">
					<image src="../../static/images/my02.png" mode=""></image>
					<text>学员</text>
				</view>
				<u-icon name="arrow-right" color="#737981" size="32"></u-icon>
			</view>
			<view class="item acea-row row-middle row-between" @click="common.go('/pages/pack/my/noticeList')">
				<view class="left acea-row row-middle">
					<image src="../../static/images/my04.png" mode=""></image>
					<text>通知管理</text>
				</view>
				<u-icon name="arrow-right" color="#737981" size="32"></u-icon>
			</view>
			<view class="item acea-row row-middle row-between" @click="common.go('/pages/pack/my/renew')">
				<view class="left acea-row row-middle">
					<image src="../../static/images/my03.png" mode=""></image>
					<text>续费管理</text>
				</view>
				<u-icon name="arrow-right" color="#737981" size="32"></u-icon>
			</view>
			<view v-show="!isWxwork" class="item acea-row row-middle row-between" @click="common.go('/pages/index/chooseJiGou')">
				<view class="left acea-row row-middle">
					<image src="../../static/images/my05.png" mode=""></image>
					<text>切换机构</text>
				</view>
				<u-icon name="arrow-right" color="#737981" size="32"></u-icon>
			</view>
		</view>
		<view class="outLogin" @click="outLogin">退出登录</view>
		<view class="commonFooter2"></view>
	</view>
</template>

<script>
	import common from '../../api/common.js'
	import request from '../../api/request.js'
	const app = getApp()
	export default{
		data(){
			return{
				isWxwork:app.globalData.isWxwork,
				common,
				info:{},
			}
		},
		onShow() {
			this.getTeacherInfo()
		},
		methods:{
			getTeacherInfo(){ //获取老师详细信息
				request.go((e)=>{
					e.data.headimg = app.globalData.baseUrl + e.data.headimg
					this.info = e.data
				},"/Jwteacher/teacherinfo",{},"POST")
			},
			outLogin(){
				// 清除缓存
				uni.removeStorage({
				    key: 'userInfo',
				    success: function (res) {
						common.go('/pages/index/login')
				    }
				});
			}
		}
	}
</script>

<style scoped>
	.my{
		min-height: 100vh;
		background-color: #F7F8FA;
	}
	.my .info{
		padding: 48rpx 0;
		background-color: #FFFFFF;
	}
	.my .info image{
		width: 144rpx;
		height: 144rpx;
		border-radius: 50%;
	}
	.my .info text{
		display: block;
	}
	.my .info text:nth-child(2){
		font-size: 40rpx;
		font-family: PingFang SC, PingFang SC-Medium;
		font-weight: 700;
		color: #1f2329;
		line-height: 56rpx;
		margin-top: 32rpx;
	}
	.my .info text:nth-child(3){
		font-size: 28rpx;
		font-family: PingFang SC, PingFang SC-Regular;
		font-weight: 400;
		color: #8f959e;
		line-height: 40rpx;
		margin-top: 16rpx;
	}
	.my .list{
		margin: 32rpx auto 0;
		width: 686rpx;
		border-radius: 24rpx;
		background-color: #FFFFFF;
	}
	.my .list .item{
		height: 112rpx;
		padding: 0 32rpx;
	}
	.my .list .item .left image{
		width: 48rpx;
		height: 48rpx;
		display: block;
		margin-right: 24rpx;
	}
	.my .list .item .left text{
		font-size: 32rpx;
		font-family: PingFang SC, PingFang SC-Regular;
		font-weight: 400;
		color: #1f2329;
		line-height: 44rpx;
	}
	.my .outLogin{
		margin: 48rpx auto 0;
		width: 686rpx;
		height: 86rpx;
		background-color: #1661FF;
		line-height: 86rpx;
		font-size: 32rpx;
		color: #FFFFFF;
		text-align: center;
		border-radius: 43rpx;
	}
</style>
